<?php 
	$form=$this->beginWidget('CActiveForm',
	 array(
	 'id'=>'myform',
	 'action' => $this->createUrl('copy_data'), 
	 'method' => 'POST',
	 'htmlOptions'=>array('target'=>'ajax-frame')
	 )); ?>
<table class="fontc_666 height32">
    <tbody>
        <tr>
            <td width="145" align="right" class="pt20 pr5"><span style="color:#f00" class="pr5">*</span>考试项目：</td>
            <td width="350" class="pt20 formValidator_td">            
                <span class="fl standard_select pt5 pr7 pb5 pl3 border_c border_3">
                    <span class="fl select_shelter">
                        <select class="fl fontc_666" name="exam_id" id="exam_id">
                            <option value="">考试项目</option>
                            <?php if (!empty($examArray)): ?>
                                <?php foreach ($examArray as $eVal): ?>
                                <option value="<?php echo $eVal['exam_id']; ?>"<?php if($exam_id == $eVal['exam_id'])echo "style='display:none'";?>><?php echo $eVal['exam_term_name']; ?></option>
                                <?php endforeach; ?>
                            <?php endif; ?>
                        </select>
                    </span>
                </span>
                <div class="formValidator_tip">
					<p id="exam_idTip" ></p>
				</div>
            </td>
        </tr>
       
        <tr>
            <td colspan="2" align="center" class="pt20 pb20">
            	<input type="hidden" value="<?php echo $exam_id;?>" name="old_exam_id">
                <input type="submit" value="保存" class="cursor b_a_n border_3 back_bgfb w80 height32 fontc_FFF fonts_12 mr10">
                <input type="button" value="取消" onClick="api.close()" class="cursor b_a_n border_3 back_bgb w80 height32 fontc_FFF fonts_12">
            </td>
        </tr>
    </tbody>
</table>
<?php $this->endWidget(); ?>
<iframe src='' style="display:none" name='ajax-frame'></iframe>
<script>
$(function(){
	$.formValidator.initConfig({formID:"myform",theme:"126",submitOnce:false,
	onError:function(msg,obj,errorlist){
		$("#errorlist").empty();
		$.map(errorlist,function(msg){
			$("#errorlist").append("<li>" + msg + "</li>")
		});
		alert(msg);
	},
	ajaxPrompt : '有数据正在异步验证，请稍等...'
	});

	/*分数段规则验证*/
	$("#exam_id").formValidator({
		onShowText:"",
		onShow:"",
		onFocus:"",
		onCorrect:""
	}).inputValidator({
		min:1,
		onError:"请选择考试项目"
	});
)}
</script>
<?php exit; ?>